package com.cskaoyan.mapper.wx.llk;

import com.cskaoyan.bean.wx.llk.WxCart;
import com.cskaoyan.bean.wx.llk.WxCartAddBO;
import com.cskaoyan.bean.wx.llk.WxCartExample;
import com.cskaoyan.vo.wx.lik.WxCartBeanVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface WxCartMapper {
    long countByExample(WxCartExample example);

    int deleteByExample(WxCartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(WxCart record);

    int insertSelective(WxCart record);

    List<WxCart> selectByExample(WxCartExample example);

    WxCart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") WxCart record, @Param("example") WxCartExample example);

    int updateByExample(@Param("record") WxCart record, @Param("example") WxCartExample example);

    int updateByPrimaryKeySelective(WxCart record);

    int updateByPrimaryKey(WxCart record);

    Map<String, Object> selectGoodsByUserID(@Param("userId") int id, @Param("isChecked") Boolean isChecked);

    WxCart selectGoodsByGoodsId(@Param("goodsId") Integer goodsId);

    Integer selectAvailableCouponLength(@Param("goodsTotalPrice") Double goodsTotalPrice, @Param("userId") Integer userId);

    Integer selectCouponPrice(@Param("couponId") Integer couponId);

    Integer selectMaxCartId();

    Integer selectCountByUserId(@Param("userId") Integer userId);

    int updateCartGoods(@Param("wxCartAddBO") WxCartAddBO wxCartAddBO, @Param("userId") Integer userId);


    List<WxCartBeanVo> queryList(int id);
}